<?
$r = "../";
require_once($r."_engine/header_nocache.php");
require_once($r."_engine/c_account.php");
require_once($r."_engine/c_plan.php");
require_once($r."_engine/c_news.php");
require_once($r."_engine/c_resources_storage.php");

$account = GetActiveAccount();
$plan = new CPlan($account->data["plan_id"]);
$n = GetLatestNews();

$account_stats = $account->GetCapabilityStats();

$p = "cp";
include $r."_header.php";
?>
<tr>
	<td colspan="2">
<?php
/* ************************************************ */
/* *****             PAGE - BEGIN             ***** */
/* ************************************************ */
$g_html_rect_white_area->PrintBegin(array('w'=>"100%"/*, 'h'=>"100%" TODO: workaround*/));
?>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr><td>

<p class="text">
Welcome back, <b><?=$account->data["first_name"]?>!</b><br>
You have had <?=$account_stats["month_changes"]?> changes detected this month.<br>
You have <?=$account_stats["active_monitors"]?> monitor(s) currently active.
<?/*
You can add <?=$account_stats["allowed_to_activate_monitors"]?> more site(s) to be tracked.<br>
You should consider <a href="">upgrading</a> your account.
*/?>
</p>

</td></tr>
<tr><td>
                              
      
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td>

<table border="0" cellspacing="5" cellpadding="0" 
    style="margin-left: -5;">
<tr>
<?php /*
    Add new group -> Add Group
    
	<td><a href="" onClick="alert('Is not implemented.'); return false;">
        <img src="../images/btn_add_new_group.gif" width="128" height="26" alt="" border="0"></a></td>
*/ ?>
	<td><a href="" onClick="on_mt_add(); return false;">
        <img src="../images/btn_add_monitor.gif" width="112" height="26" alt="" border="0"></a></td>
	<td><a href="" onClick="on_mt_todo('pause'); return false;">
        <img src="../images/btn_pause.gif" width="73" height="26" alt="" border="0"></a></td>
	<td><a href="" onClick="on_mt_todo('activate'); return false;">
        <img src="../images/btn_resume.gif" width="83" height="26" alt="" border="0"></a></td>
	<td><a href="" onClick="on_mt_todo('remove'); return false;">
        <img src="../images/btn_delete.gif" width="79" height="26" alt="" border="0"></a></td>
</tr>
</table>

</td><td align="right">

<!--p class="text">
View: Table | <a href="">Group</a>
</p-->

</td></tr>
</table>


<script language="javascript" type="text/javascript" src="<?=$r?>js/main.js">
</script>
<script language="javascript" type="text/javascript" src="<?=$r?>js/cp.js">
</script>

<script type="text/javascript" language="JavaScript">
function onClickAlertTypeFeed(mid)
{
	var ch = document.getElementById('id_alert_type_feed_'+mid).checked;
	var el = document.getElementById('id_tr_at_feeds_'+mid);
	if (ch) { 
		el.style.visibility="visible";
		el.style.position="relative";
	} else {
		el.style.visibility="hidden";
		el.style.position="absolute";
	}	
}

function update_hl_ex(mid)
{
	var f = document.getElementsByName('form_monitor_'+mid)[0];
    if (!f) {
        alert('Element not found: ' + 'form_monitor_'+mid);
        return false;
    }
	update_highlight_example(
		"hl_ex_"+mid, "hl_ex2_"+mid, "hl_exi_"+mid, "hl_exi2_"+mid,
		f.f_highlight_font_color.value, f.f_highlight_bk_color.value,
		f.f_hl_fs_1.checked, f.f_hl_fs_2.checked, f.f_hl_fs_4.checked, f.f_hl_fs_8.checked
	);
}
</script>

		
<div id="div_tm">
<?php include "cp__tm.php"; ?>
</div>      

<div id="div_tm_action"
	style="position: absolute; visibility: hidden; top: -10000;">
<table cellspacing="10" cellpadding="0">
<tr>
	<td><img src="../images/throbber.gif" width="39" height="39" alt="" border="0"></td>
	<td><p class="text" id="tm_action_text">Loading...</td>
</tr>
</table>
</div>

</td></tr>
</table>


<?php if (@$em_action) { ?>
<script type="text/javascript" language="JavaScript">
doSection(<?=@$em_mid?>);
</script>
<? } ?>


<?php 
/* ************************************************ */
/* *****            PAGE - END                ***** */
/* ************************************************ */
$g_html_rect_white_area->PrintEnd();
?>
    </td>
</tr>

<tr>
	<td style="width:50%; vertical-align:top">


<? require_once($r."general/info_blocks_bottom.php"); ?>

    </td>
</tr>    
<?
include $r."_footer.php";
?>